import { request } from '@/utils/request';
import { PageParams } from "@/api/model/pageParams";

const page = async (params: PageParams) => {
    return request.post({
        url: '/sysPermission/page',
        data: params
    });
}

const insertApi = async (data: any) => {
    return request.post({
        url: '/sysPermission/insert',
        data
    });
}

const updateApi = async (data: any) => {
    return request.post({
        url: '/sysPermission/update',
        data
    });
}

const deleteById = async (id: string) => {
    return request.get({
        url: `/sysPermission/delete/${id}`,
    });
}

export {
    page,
    insertApi,
    updateApi,
    deleteById
}
